package com.smt.take.model.net

import com.smt.take.model.beans.GoodsBean
import com.smt.take.model.beans.HomeListBean
import com.smt.take.model.beans.OrderBean
import com.smt.take.model.beans.UserBean
import retrofit2.Call
import retrofit2.http.GET
import retrofit2.http.Query
import rx.Observable

interface TakeOutService {

    @GET("home")
    fun getHomeInfo(): Call<BaseResponse<HomeListBean>>

    @GET("login")
    fun getLoginByPhone(@Query("phone") phone: String): Call<BaseResponse<UserBean>>

    @GET("order")
    fun getOrderList(@Query("id") userId: String): Call<BaseResponse<MutableList<OrderBean>>>

    // 使用rxjava组合的接口
    @GET("order")
    fun getOrderListByRxjava(@Query("id") userId: String): Observable<BaseResponse<MutableList<OrderBean>>>

    @GET("business")
    fun getGoodsInfo(@Query("sellerId") sellerId: String):Call<BaseResponse<GoodsBean>>

}